package com.nirvana.factory;


import com.nirvana.flatbuffers.*;

import java.util.Set;

/**
 * Copyright (c) 2022 Aoshu.Co.Ltd. All rights reserved.
 *
 * @author :    zhouqichun
 * @create :    2025/11/13 14:24
 * @description :
 **/
public class FlatBuffersResolveFactory {
    private static final Set<IResolve> RESOLVES = Set.of(
            new BaseResolver(),
            new TupleResolver(),
            new StringResolver(),
            new CollectionResolver(),
            new GiveItemResolver(),
            new TimeSpaceResolver(),
            new WeightsWapperResolver(),
            new DropResolver()
    );

    public static IResolve getResolver(String propertyType) {
        for (IResolve resolve : RESOLVES) {
            if (resolve.canResolve(propertyType)) {
                return resolve;
            }
        }

        return null;
    }
}
